package com.gsafety.wellsfort.dao.knowledge;

import com.gsafety.wellsfort.domain.model.knowledge.Question;
import com.gsafety.wellsfort.domain.model.knowledge.WorkQuestion;
import com.gsafety.wellsfort.domain.vo.QuestionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface WorkQuestionDAO {
    int deleteByPrimaryKey(Integer id);
    int deleteByWorkId(Integer id);

    int insert(WorkQuestion record);

    int insertSelective(WorkQuestion record);

    WorkQuestion selectByPrimaryKey(Integer id);

    int countQuestionNum(@Param("workId") Integer workId, @Param("questionType")Integer questionType);

    WorkQuestion selectByWorkIdAndQuestionId(@Param("workId") Integer workId, @Param("questionId")Integer questionId);

    List<QuestionVO> selectByParam(Map params);

    List<Question> selectAddQuestionByParam(Map params);

    int updateByPrimaryKeySelective(WorkQuestion record);

    int updateByPrimaryKey(WorkQuestion record);
}